package myJdbc;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
public class myJdbc {
    public static final String url = "jdbc:mysql://localhost:3306/email";
    public static final String user = "root";
    public static final String psw = "123321";
    public static void main(String[] args) throws Exception {
        Class.forName("com.mysql.cj.jdbc.Driver");
        Connection conn = DriverManager.getConnection(url,user,psw);
        Statement stmt = conn.createStatement();
        ResultSet rs = stmt.executeQuery("SELECT grade from email");
        while(rs.next())
        {
            System.out.println(rs.getString("grade"));
        };
        rs.close();
        stmt.close();
        conn.close();
    }
}